package com.sihai.ehr.service;

import com.sihai.core.Limit;
import com.sihai.core.LimitedList;
import com.sihai.core.Sorter;
import com.sihai.ehr.model.biz.Attendance;
import com.sihai.ehr.model.biz.AttendanceImportLog;
import com.sihai.ehr.model.sys.ExaminePeriodEnum;

import java.io.File;
import java.util.List;

/**
 * author: wxn
 * since: 13-1-21 Time: 上午10:06
 * 考勤数据服务
 */
public interface SalaryAttendanceService {
    /*考勤数据导入(从考勤DB)*/
    String importAttendanceDataFromDB(final Long organizationId, final Integer year, final Integer month) throws Exception;

    /*考勤数据导入(从Excep文件)*/
    String importAttendanceData(File file, Long organizationId, Integer year, Integer month) throws Exception;

    LimitedList<Attendance> find(int year, int month, Long organizationId, Long dutyId, Limit limit, Sorter sorter) throws Exception;
    
    /** 根据员工工作编号获取考勤数据列表 */
    LimitedList<Attendance> findAttendancesByWorkId(Long workId,int startYear, int startMonth, int endYear, int endMonth, Limit limit, Sorter sorter) throws Exception;

    /*ERP数据导入*/
    String importERPData(File file, Long organizationId, Integer year, Integer month);

    List<AttendanceImportLog> findAttendanceLog(Long organizationId, Integer year, Integer month)throws Exception;

    LimitedList findAttendances(String type, Long organizationId, Integer year, Integer month, Limit limit, Sorter sorter);

    void delete(Long organizationId, Integer year, Integer month, String type)throws Exception;

    //查找已考核总数
    Long findExamCount(Long organizationId, Integer year, Integer month);

    //查找分公司人数
    Long findEmployeeCount(final Long organizationId);
}
